<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>t_rcvuderr</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4>NAME</h4><blockquote>
t_rcvuderr - receive a unit data error indication
</blockquote><h4>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="xti.h.html">xti.h</a>&gt;

int t_rcvuderr(
    int fd,
    struct t_uderr *uderr)
</code>
</pre>
</blockquote><h4>DESCRIPTION</h4><blockquote>
<pre>
<P><table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Parameters</b>
<th align=center><b>Before call</b>
<th align=center><b>After call</b>
<tr valign=top><td align=left>fd
<td align=center>x
<td align=center>/
<tr valign=top><td align=left>uderr-&gt
<td align=center>addr.maxlen
<td align=center>x
<tr valign=top><td align=left>uderr-&gt
<td align=center>addr.len
<td align=center>/
<tr valign=top><td align=left>uderr-&gt
<td align=center>addr.buf
<td align=center>?
<tr valign=top><td align=left>uderr-&gt
<td align=center>opt.maxlen
<td align=center>x
<tr valign=top><td align=left>uderr-&gt
<td align=center>opt.len
<td align=center>/
<tr valign=top><td align=left>uderr-&gt
<td align=center>opt.buf
<td align=center>?
<tr valign=top><td align=left>uderr-&gt
<td align=center>error
<td align=center>/
</table>
</pre>
<p>
This function is used in connectionless-mode
to receive information concerning an error
on a previously sent data unit, and
should only be issued following a unit data error indication.
It informs the transport user that a data unit with a specific
destination address and protocol options produced an error.
The argument
<I>fd</I>
identifies the local transport endpoint through which the error
report will be received, and
<I>uderr</I>
points to a
<B>t_uderr</B>
structure containing the following members:
<pre>
<code>
struct netbuf addr;
struct netbuf opt;
t_scalar_t error;
</code>
</pre>
<p>
The
<I>maxlen</I>
field of
<I>addr</I>
and
<I>opt</I>
must be set before calling this function to indicate the maximum
size of the buffer for each.
If this field
is set to zero for 
<I>addr</I>
or 
<I>opt</I>,
no information is returned in the 
<I>buf</I>
field of this parameter.
<p>
On return from this call, the
<I>addr</I>
structure specifies the destination protocol address of the erroneous data
unit, the
<I>opt</I>
structure identifies options that were
associated with the data unit, and
<I>error</I>
specifies a protocol-dependent error code.
<p>
If the user does not care to identify the data unit
that produced an error,
<I>uderr</I>
may be set to a null pointer, and
<i>t_rcvuderr()</i>
will simply clear the error indication without reporting any
information to the user.
</blockquote><h4>VALID STATES</h4><blockquote>
T_IDLE
</blockquote><h4>ERRORS</h4><blockquote>
On failure,
<I>t_errno</I>
is set to one of the following:
<dl compact>

<dt>[TBADF]<dd>The specified file descriptor does not refer to a transport endpoint.

<dt>[TBUFOVFLW]<dd>The number of bytes allocated for the incoming protocol address or
options
<I>(maxlen)</I>
is greater than 0 but not
sufficient to store the information.
The unit data error information to be returned in
<I>uderr</I>
will be discarded.

<dt>[TNOTSUPPORT]<dd>This function is not supported by the underlying transport
provider.

<dt>[TNOUDERR]<dd>No unit data error indication currently exists on the specified
transport endpoint.

<dt>[TOUTSTATE]<dd>The communications endpoint referenced by
<I>fd</I>
is not in one of the states in which a call to this function is valid.

<dt>[TPROTO]<dd>This error indicates that a communication problem has been detected between
XTI and the transport provider for which there is no other suitable XTI
error
<I>(t_errno)</I>.

<dt>[TSYSERR]<dd>A system error has occurred during execution of this function.

</dl>
</blockquote><h4>RETURN VALUE</h4><blockquote>
Upon successful completion, a value of 0 is returned.  Otherwise,
a value of -1 is returned and
<I>t_errno</I>
is set to indicate an error.
</blockquote><h4>SEE ALSO</h4><blockquote>
<i><a href="t_rcvudata.html">t_rcvudata()</a></i>,
<i><a href="t_sndudata.html">t_sndudata()</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
